home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9877 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.crystalball.com!news
  2. From: Larry Weiss <lfw@oc.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Standard question - pointer initialization
  5. Date: Wed, 13 Mar 1996 16:13:51 -0600
  6. Organization: crystalball.com
  7. Message-ID: <3147489F.10E4@oc.com>
  8. References: <4hk9un$906@hammer.msfc.nasa.gov> <4hl6rr$nde@news.xs4all.nl> <313E6028.1C19@ix.netcom.com> <4hnpsl$g8c@hacgate2.hac.com> <4hq9hsINN998@keats.ugrad.cs.ubc.ca> <4i7cgn$5da@baygull.rtd.com> <4i7cve$5da@baygull.rtd.com>
  9. NNTP-Posting-Host: external.oc.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Ronald Collins wrote:
  16.  > 
  17.  > To follow-up on my own post ... the standard requires a zero to be
  18.  > used as NULL _only_ when the literal "0" is used.  A variable set to
  19.  > 0 (as in "int var = 0;") then cast to a pointer (as in "*p = (char *) var")
  20.  > is _not_ required to convert to a NULL.
  21.  > 
  22.  > If, above, you were talking about a literal "0", then I withdraw my comments.
  23.  > If you were talking of any numeric 0 value casting to a NULL, then my
  24.  > comments stand.
  25.  
  26. I think of 0 in this context as no more, and no less than an alternative
  27. spelling for NULL.
  28.